package com.ahwei.user.util.easyexcel.service.impl;

import com.ahwei.user.service.UserService;
import com.ahwei.user.util.easyexcel.entity.ExcelEntity;
import com.ahwei.user.util.easyexcel.listener.ExcelListener;
import com.ahwei.user.util.easyexcel.service.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 这是一个Java文件！
 * </p>
 *
 * @author ahWei
 * @email：ahwei163@qq.com
 * @since 2022-06-15 19:25:48
 */
@Service
public class ExcelEntityServiceImpl implements ExcelService<ExcelEntity> {
    @Autowired
    private UserService userService;


    @Override
    public List<ExcelEntity> dataImport(List<ExcelEntity> dataList) {
        System.out.println("service数据===============");
        dataList.forEach(System.out::println);
        return dataList;
    }

    @Override
    public List<ExcelEntity> dataExport() {
        return (List<ExcelEntity>) ExcelListener.readData;
    }
}
